package com.zq.app.service;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zq.app.repository.EmployeeRepository;
@Service
public class EmployeeService {
	@Autowired
	private EmployeeRepository employeeRepository;
	@Transactional//不添加事务无法成功更改数据库
	public void update(Integer id,Integer age){
		employeeRepository.update(id, age);
	}
	
}
